interface IResData<T> {
  code: string;
  message: string;
  data: T;
}
import http from "../utils/request";
function login(adminname, password) {
  return http({
    method: "post",
    url: "/admin/admin/login",
    data: {
      adminname,
      password,
    },
  });
}
function productTongjiRequest() {
  //http函数返回的是什么？promsie对象

  // productSearch 把http函数调用以后promsie对象作为了返回值
  return http<IResData<number>>({
    method: "get",
    url: "/admin/statistic/product",
    data: {},
  });
}

function userTongjiRequest() {
  //http函数返回的是什么？promsie对象

  // productSearch 把http函数调用以后promsie对象作为了返回值
  return http<IResData<number>>({
    method: "get",
    url: "/admin/statistic/user",
    data: {},
  });
}
export { login, userTongjiRequest, productTongjiRequest };
